﻿using Bootstrap.Security;
using Longbow.Cache;
using Longbow.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Bootstrap.DataAccess.Model;
using Longbow.Web.Mvc;
using PetaPoco;

namespace Bootstrap.DataAccess
{
    /// <summary>
    /// 呼叫统计
    /// </summary>
    public static class CallResultStatisticHelper
    {
        public const string RetrieveCallResultStatisticDataKey = "UserHelper-RetrieveCallResultStatistic";
        public const string RetrieveCallResultStatisticByRoleIdDataKey = "UserHelper-RetrieveCallResultStatisticByRoleId";
        public const string RetrieveCallResultStatisticByGroupIdDataKey = "UserHelper-RetrieveCallResultStatisticByGroupId";
        public const string RetrieveNewCallResultStatisticDataKey = "UserHelper-RetrieveNewCallResultStatistic";
        public const string RetrieveCallResultStatisticByNameDataKey = "BootstrapUser-RetrieveCallResultStatisticByName";

        /// <summary>
        /// 查询呼叫统计
        /// </summary>
        /// <returns></returns>
        public static Page<CallResultStatistic> RetrievePages(PaginationOption op, DateTime? startTime, DateTime? endTime) =>
            DbContextManager.Create<CallResultStatistic>().RetrievePages(op, startTime, endTime);


    }
}
